<template>
  <view class="content">
    <div class="li" v-for="lists in list">
      <div class="title">
        <span>{{ lists.title }}</span>

        <span class="time">{{lists.createTime}}
        <uni-tag v-if="lists.readTime!=null" text="新" type="error" />

      </span>
      </div>
      <div class="text" v-html="lists.content"></div>
    </div>
    <!--			 空状态-->
    <div class="null" v-if="show">
      <image src="../../static/null.png" mode="widthFix"></image>
      <div class="text">暂无系统信息～</div>
    </div>
  </view>
</template>

<script>
import Api from "../../API/api";
export default {
  data() {
    return {
      show: false,
      list:[]
    }
  },
  onLoad() {
    Api.getBulletinList().then(res=>{
      if (res.data.records.length <= 0) {
        this.show = true;
      }else {
        this.show = false;
        this.list = res.data.records
        Api.reviseNotice().then()
      }
    })

  },
  methods: {

  }
}
</script>

<style lang="less" scoped>
.content{
  .li{
    width: 90%;
    background: #FFFFFF;
    border-radius: 20rpx;
    margin: 30rpx auto;
    padding: 30rpx;
    box-sizing: border-box;
    .title{
      font-weight: 700;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .time{

        font-weight: 400;
        color: #bbb;
        font-size: 26rpx
      }
    }
    .text{
      margin-top: 30rpx;
      text-indent: 20px;
    }
  }
}
.null {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%,-50%);
  image {
    width: 200rpx;
  }
  .text{
    margin-top: 20rpx;
    color: #aaa;
    font-size: 26rpx;
  }
}
</style>